<% var columns = 5; %>
<% var i=0; %>


<table>

<% for(i=0; i<images.length; i++) { %>
	<% if(images[i].description===undefined) { images[i].description = 'No description' } %>
	<% if(i%columns===0){ %>
		<tr>
	<% } %>
	<td><a href='<%= '/images/view/' + images[i].id %>'><figure><img height='200' width='auto' src='<%= "/images/" + images[i].id %>' /></a><figcaption>Name: <%= images[i].name %></br>Description: <%= images[i].description %></br>Owner: <%= images[i].owner %></figcaption></figure></td>
	<% if(i%columns === columns-1) { %>
		</tr>
	<% } %>
<% } %>
			 
</table>